package com.yao.mall.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yao.mall.model.entity.SkuImage;
import com.yao.mall.model.vo.SkuImageVO;
import com.yao.mall.model.vo.SpuImageVO;
import com.yao.mall.service.SkuImageService;
import com.yao.mall.mapper.SkuImageMapper;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author jiahua.yao
* @description 针对表【sku_image】的数据库操作Service实现
* @date 2024-03-25 16:12:24
*/
@Service
public class SkuImageServiceImpl extends ServiceImpl<SkuImageMapper, SkuImage>
    implements SkuImageService{


    @Override
    public List<SkuImageVO> toSkuImageVOList(List<SkuImage> skuImageList) {
        return skuImageList.stream().map(skuImage -> {
            SkuImageVO skuImageVO = new SkuImageVO();
            BeanUtils.copyProperties(skuImage, skuImageVO);
            return skuImageVO;
        }).toList();
    }
}




